package com.android.xk.mask.client

import com.android.xk.mask.event.TransparentEvent
import io.netty.channel.ChannelHandlerContext
import io.netty.channel.SimpleChannelInboundHandler
import org.simple.eventbus.EventBus

class SerialPortHandler : SimpleChannelInboundHandler<ByteArray>()
{
    override fun channelRead0(ctx: ChannelHandlerContext?, msg: ByteArray?)
    {
        msg?.let {
            EventBus.getDefault().post(TransparentEvent(it))
        }

    }
}